package cn.fz.config;

import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        Contact contact = new Contact();
        contact.setName("xxxxxxx部");
        return new OpenAPI()
                .info(new Info()
                .title("sa-token测试")
                .contact(contact)
                .version("1.0")
                .description("sa-token测试文档")
                .termsOfService("http://localhost:8029/doc.html")
                .license(new License().name("Apache 2.0").url("http://localhost:8029/doc.html")));
    }
}
